SET IDENTITY_INSERT [CMS_Query] ON
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2964, N'CheckDependencies', 0, N'SELECT TOP 1 SKUPublicStatusID FROM [COM_SKU] WHERE SKUPublicStatusID=@ID', 0, 1145, 0, '20080313 09:35:00', '8b2eb62a-7cf8-4184-a7b8-e0b3bf4067c4', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2966, N'CheckDependencies', 0, N'SELECT TOP 1 TaxClassID FROM [COM_SKUTaxClasses] WHERE TaxClassID=@ID', 0, 1152, 0, '20080313 09:35:00', 'b18696d0-6e66-4434-a9aa-c95dc43bec58', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2954, N'UpdateThreadCounts', 1, N'Proc_Forums_ForumPost_UpdateThreadCounts', 0, 1123, 0, '20080313 09:35:00', '59fb372c-5d70-4e71-a53b-d68371335a50', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2969, N'CheckDependencies', 0, N'SELECT TOP 1 PaymentOptionID FROM  [COM_PaymentOption] WHERE ( (PaymentOptionID = (SELECT TOP 1 ShoppingCartPaymentOptionID FROM [COM_ShoppingCart] WHERE ShoppingCartPaymentOptionID=@ID ))OR(PaymentOptionID = (SELECT TOP 1 OrderPaymentOptionID FROM [COM_ORDER] WHERE OrderPaymentOptionID=@ID ))OR(PaymentOptionID = (SELECT TOP 1 CustomerPrefferedPaymentOptionID FROM [COM_Customer] WHERE CustomerPrefferedPaymentOptionID=@ID ))  )', 0, 1144, 0, '20080313 09:35:00', 'f132ea94-cff3-465b-8a1e-baf9a45c03fb', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2970, N'CheckDependencies', 0, N'SELECT TOP 1 SKUDepartmentID FROM [COM_SKU] WHERE SKUDepartmentID=@ID', 0, 1148, 0, '20080313 09:35:00', '52a7154c-c307-4cb6-91ae-5fcb125aeec1', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2959, N'CheckDependencies', 0, N'SELECT * FROM COM_OrderStatus WHERE ((StatusID IN (SELECT FromStatusID FROM COM_OrderStatusUser WHERE FromStatusID= @ID))OR(StatusID IN (SELECT ToStatusID FROM COM_OrderStatusUser WHERE ToStatusID= @ID))OR(StatusID IN (SELECT OrderStatusID FROM COM_Order WHERE OrderStatusID= @ID)) OR (StatusID IN (SELECT TOP 1 PaymentOptionSucceededOrderStatusID FROM COM_PaymentOption WHERE PaymentOptionSucceededOrderStatusID = @ID))OR (StatusID IN (SELECT TOP 1 PaymentOptionFailedOrderStatusID FROM COM_PaymentOption WHERE PaymentOptionFailedOrderStatusID = @ID)))', 0, 1146, 0, '20080313 09:35:00', 'c6233992-dfe6-4c6b-a4df-f52e77f618a2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (250, N'isuserinrole', 0, N'SELECT UserID FROM CMS_UserRole WHERE UserID = @UserID AND RoleID = @RoleID', 0, 109, 0, '20080313 09:35:00', '584dfa24-6399-4248-ad21-551c3e4a2e89', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (252, N'roleexists', 0, N'SELECT RoleID FROM CMS_Role WHERE RoleID = @RoleID', 0, 56, 0, '20080313 09:35:00', '88e52832-269d-4714-a11f-bae9eee7872e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (293, N'movenodeup', 1, N'proc_CMS_Tree_MoveNodeUp', 1, 143, 0, '20080313 09:35:00', 'acd1c541-1c14-4a1a-b9d9-e950babba7ac', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (294, N'movenodedown', 1, N'Proc_CMS_Tree_MoveNodeDown', 1, 143, 0, '20091006 17:39:00', '60b1c963-c197-4a2b-bca4-af4bb5bdacb6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (284, N'AddPageTemplateToSite', 0, N'INSERT INTO CMS_PageTemplateSite (PageTemplateID,SiteID) VALUES (@PageTemplateID,@SiteID)', 1, 157, 0, '20080313 09:35:00', '99174f97-d41f-4132-b55c-85b6ec8af659', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (234, N'updatechildnodespath', 1, N'Proc_CMS_Tree_UpdateChildNodesPath', 1, 143, 0, '20080313 09:35:00', '4cde9a22-3f2f-484b-9870-8a3592980453', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (377, N'isonsite', 0, N'SELECT * FROM CMS_ResourceSite WHERE ResourceID = @ResourceID AND SiteID = @SiteID', 0, 134, 0, '20080313 09:35:00', '660d60e0-8970-47f5-872f-7b1a11288800', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (390, N'isPermissionToRole', 0, N'SELECT * FROM CMS_RolePermission WHERE (RoleID=@RoleID AND PermissionID=@PermissionID)', 0, 131, 0, '20080313 09:35:00', '90908c8b-1776-4edf-a86b-ae4638de301f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (366, N'isonsite', 0, N'SELECT * FROM CMS_SiteCulture WHERE CultureID = @CultureID AND SiteID = @SiteID', 0, 1, 0, '20080313 09:35:00', '482870c9-7ba4-4584-a3a4-b0a688d9f2ac', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (368, N'AddCultureToSite', 0, N'INSERT INTO [CMS_SiteCulture] (SiteID, CultureID) VALUES (@SiteID, @CultureID)', 0, 1, 0, '20080313 09:35:00', '652951ac-c61f-4e47-8577-95978955b651', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (371, N'RemoveCultureFromSite', 0, N'DELETE FROM [CMS_SiteCulture] WHERE SiteID = @SiteID AND CultureID = @CultureID', 0, 1, 0, '20080313 09:35:00', 'e69ea40b-3bc6-4d03-8368-8debdf250f55', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (226, N'allowpermission', 0, N'INSERT INTO [CMS_RolePermission] ([RoleID], [PermissionID]) VALUES (@RoleID, @PermissionID)', 0, 131, 0, '20080313 09:35:00', 'b7a6def6-bbae-4ade-8a45-09de51a351b7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (227, N'denypermission', 0, N'DELETE FROM [CMS_RolePermission] WHERE [RoleID] = @RoleID AND [PermissionID] = @PermissionID', 0, 131, 0, '20080313 09:35:00', 'ccd27133-b70b-4643-af0d-0f3f7f488b22', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (255, N'findusersinrole', 0, N'SELECT UserName FROM CMS_User WHERE UserID IN (SELECT UserID FROM CMS_UserRole WHERE RoleID = @RoleID) AND UserName LIKE @UserNameToMatch', 0, 59, 0, '20091201 11:43:18', '8cfccfce-20a2-4e4d-a25b-8a2fbed514ed', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (261, N'classsite', 0, N'SELECT *  FROM CMS_ClassSite WHERE ClassID=@ClassID', 0, 145, 0, '20080313 09:35:00', '537141a4-357c-405c-9f47-ffa59dd5b012', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (262, N'childclasses', 0, N'SELECT * FROM CMS_AllowedChildClasses WHERE ParentClassID=@ParentClassID', 0, 145, 0, '20080313 09:35:00', '3c366887-4e4b-45a1-b695-1f7a49d1cea9', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1296, N'insert', 0, N'INSERT INTO Newsletter_EmailTemplate ([TemplateDisplayName], [TemplateName], [TemplateBody], [TemplateSiteID], [TemplateHeader], [TemplateFooter], [TemplateType], [TemplateStylesheetText], [TemplateGUID], [TemplateLastModified], [TemplateSubject] ) VALUES ( @TemplateDisplayName, @TemplateName, @TemplateBody, @TemplateSiteID, @TemplateHeader, @TemplateFooter, @TemplateType, @TemplateStylesheetText, @TemplateGUID, @TemplateLastModified, @TemplateSubject); SELECT SCOPE_IDENTITY() AS [TemplateID]', 1, 905, 0, '20081229 09:07:12', '657e4b70-e8af-42b2-bacd-5be0800e21e9', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1297, N'update', 0, N'UPDATE Newsletter_EmailTemplate SET [TemplateDisplayName] = @TemplateDisplayName, [TemplateName] = @TemplateName, [TemplateBody] = @TemplateBody, [TemplateSiteID] = @TemplateSiteID, [TemplateHeader] = @TemplateHeader, [TemplateFooter] = @TemplateFooter, [TemplateType] = @TemplateType, [TemplateStylesheetText] = @TemplateStylesheetText, [TemplateGUID] = @TemplateGUID, [TemplateLastModified] = @TemplateLastModified, [TemplateSubject] = @TemplateSubject WHERE [TemplateID] = @TemplateID', 0, 905, 0, '20081229 09:07:12', '3ec2d257-cc2e-4cad-b1bf-a809ecc932fb', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (959, N'removeallwithname', 0, N'DELETE FROM [CMS_Relationship] WHERE RelationshipNameID = @ID', 0, 537, 0, '20080313 09:35:00', 'ad94aace-0b4a-44f9-88b7-6db5d90c8f43', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (927, N'insert', 0, N'INSERT INTO CMS_SiteDomainAlias ([SiteDomainAliasName], [SiteID], [SiteDefaultVisitorCulture], [SiteDomainGUID], [SiteDomainLastModified], [SiteDomainDefaultAliasPath], [SiteDomainRedirectUrl] ) VALUES ( @SiteDomainAliasName, @SiteID, @SiteDefaultVisitorCulture, @SiteDomainGUID, @SiteDomainLastModified, @SiteDomainDefaultAliasPath, @SiteDomainRedirectUrl); SELECT SCOPE_IDENTITY() AS [SiteDomainAliasID]', 1, 661, 0, '20081229 09:07:23', '3604e1e5-38a4-4663-9cd9-5d93dbdc11f5', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (929, N'deleteBySite', 0, N'DELETE FROM [CMS_SiteDomainAlias] WHERE [SiteID] = @SiteID AND  [SiteDomainAliasName] =@SiteDomainAliasName', 0, 661, 0, '20080313 09:35:00', '84e4dedf-7bb3-4618-a7ac-94df0b85e2e6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (913, N'isinsite', 0, N'SELECT * FROM CMS_CssStylesheetSite WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 555, 0, '20080313 09:35:00', '2bdeb87a-a7dc-49ac-be10-3cc197c9042f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (906, N'addtosite', 0, N'INSERT INTO CMS_CssStylesheetSite (StylesheetID,SiteID) VALUES (@StylesheetID,@SiteID)', 0, 555, 0, '20080313 09:35:00', 'e7cd2fa1-921b-482e-99d6-5215ef266788', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (907, N'removefromsite', 0, N'DELETE FROM CMS_CssStylesheetSite WHERE StylesheetID = @StylesheetID AND SiteID = @SiteID', 0, 555, 0, '20080313 09:35:00', 'fa31bf6c-ff56-4c4b-adc7-79d869e99643', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (886, N'insert', 0, N'INSERT INTO CMS_RelationshipNameSite ([RelationshipNameID], [SiteID] ) VALUES ( @RelationshipNameID, @SiteID);', 1, 536, 0, '20081229 09:07:21', '1d0c115a-8dcb-4ca1-904a-96a6e5c80d58', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (888, N'remove', 0, N'DELETE FROM [CMS_RelationshipNameSite] WHERE ([RelationshipNameID] = @RelationshipNameID AND [SiteID] = @SiteID)', 0, 536, 0, '20080313 09:35:00', '18975062-350c-4fcc-aba3-0fd1c9bc6a38', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (872, N'delete', 0, N'DELETE FROM CMS_RelationshipName WHERE [RelationshipNameID] = @ID', 0, 530, 0, '20081229 09:07:21', 'e273919e-a652-4857-952f-bd9073e7f1e2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (873, N'insert', 0, N'INSERT INTO CMS_RelationshipName ([RelationshipDisplayName], [RelationshipName], [RelationshipAllowedObjects], [RelationshipGUID], [RelationshipLastModified] ) VALUES ( @RelationshipDisplayName, @RelationshipName, @RelationshipAllowedObjects, @RelationshipGUID, @RelationshipLastModified); SELECT SCOPE_IDENTITY() AS [RelationshipNameID]', 1, 530, 0, '20081229 09:07:21', '7e8eb1ff-98b6-4c15-afec-94fb7165f410', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (874, N'update', 0, N'UPDATE CMS_RelationshipName SET [RelationshipDisplayName] = @RelationshipDisplayName, [RelationshipName] = @RelationshipName, [RelationshipAllowedObjects] = @RelationshipAllowedObjects, [RelationshipGUID] = @RelationshipGUID, [RelationshipLastModified] = @RelationshipLastModified WHERE [RelationshipNameID] = @RelationshipNameID', 0, 530, 0, '20081229 09:07:21', '25935c53-95d1-4e4c-b459-87faa6bbd901', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (863, N'getversion', 0, N'SELECT * FROM CMS_AttachmentHistory WHERE AttachmentGUID = @AttachmentGUID AND AttachmentHistoryID IN (SELECT AttachmentHistoryID FROM CMS_VersionAttachment WHERE VersionHistoryID = @VersionHistoryID)', 0, 516, 0, '20080313 09:35:00', 'e6fe60d4-c432-4da0-8a25-e4b196788ccd', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (864, N'removeattachment', 1, N'Proc_CMS_AttachmentHistory_RemoveAttachment', 1, 516, 0, '20080313 09:35:00', '82c30421-1b8f-4f16-aa67-aff4e9f198a5', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (865, N'copyattachments', 1, N'Proc_CMS_AttachmentHistory_CopyAttachments', 1, 516, 0, '20080313 09:35:00', '5b92f80a-5411-4465-b71f-987e275f2560', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (866, N'addtoversion', 0, N'INSERT INTO CMS_VersionAttachment (VersionHistoryID, AttachmentHistoryID) VALUES (@VersionHistoryID, @AttachmentHistoryID)', 1, 516, 0, '20080313 09:35:00', '45deec38-cccd-4007-9e34-eda67a5c4591', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (867, N'removefromversion', 0, N'DELETE FROM CMS_VersionAttachment WHERE VersionHistoryID = @VersionHistoryID AND AttachmentHistoryID = @AttachmentHistoryID', 1, 516, 0, '20080313 09:35:00', '5179571f-2cb5-4f09-a600-ac31ac6887d2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (868, N'getversionattachments', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_AttachmentHistory WHERE (##WHERE##) AND AttachmentHistoryID IN (SELECT AttachmentHistoryID FROM CMS_VersionAttachment WHERE VersionHistoryID = @VersionHistoryID) ORDER BY ##ORDERBY##', 0, 516, 0, '20091012 09:42:02', '84759425-3679-4beb-a476-a85f3c8b46e3', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (890, N'insert', 0, N'INSERT INTO CMS_Relationship ( [RightNodeID],[LeftNodeID], [RelationshipNameID], [RelationshipCustomData] ) VALUES (  @RightNodeID,@LeftNodeID, @RelationshipNameID, @RelationshipCustomData); SELECT SCOPE_IDENTITY() AS [LeftNodeID]', 1, 537, 1, '20080313 09:35:00', 'af0cfed4-3b1f-4c57-9259-a4cdf6fd28f5', 2, 1)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (893, N'remove', 0, N'DELETE FROM [CMS_Relationship] WHERE ([LeftNodeID] = @LeftNodeID AND [RightNodeID] = @RightNodeID AND [RelationshipNameID] = @RelationshipNameID)', 0, 537, 0, '20080313 09:35:00', 'ad9e120d-9854-44b2-9af7-69b9b82a5bdf', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (894, N'delete', 0, N'DELETE FROM CMS_RelationshipNameSite WHERE [RelationshipNameID] = @RelationshipNameID AND [SiteID] = @SiteID', 0, 536, 0, '20081229 09:07:21', '77800ce7-6352-4856-96ee-e5886cf88278', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (757, N'update', 0, N'UPDATE CMS_UICulture SET [UICultureName] = @UICultureName, [UICultureCode] = @UICultureCode, [UICultureGUID] = @UICultureGUID, [UICultureLastModified] = @UICultureLastModified WHERE [UICultureID] = @UICultureID', 0, 490, 0, '20081229 09:07:39', 'a7f44b1e-c4d5-4d29-a89b-e49220132809', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (758, N'insert', 0, N'INSERT INTO CMS_UICulture ([UICultureName], [UICultureCode], [UICultureGUID], [UICultureLastModified] ) VALUES ( @UICultureName, @UICultureCode, @UICultureGUID, @UICultureLastModified); SELECT SCOPE_IDENTITY() AS [UICultureID]', 1, 490, 0, '20081229 09:07:39', '651a4e92-bad5-40d9-bde2-b7d97f838bf8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (761, N'delete', 0, N'DELETE FROM CMS_UICulture WHERE [UICultureID] = @ID', 0, 490, 0, '20081229 09:07:39', 'b952b7db-ef15-4617-b2b9-aa7e1cbc5fac', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (747, N'delete', 0, N'DELETE FROM CMS_PageTemplateCategory WHERE [CategoryID] = @ID', 0, 405, 0, '20091103 08:50:35', '0cfad33f-a6cd-41f3-a8b3-77e9d6161510', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (732, N'deletestep', 0, N'DELETE FROM [CMS_WorkflowStepRoles] WHERE StepID = @StepID; DELETE FROM [CMS_WorkflowStep] WHERE StepID = @StepID', 1, 172, 0, '20080313 09:35:00', '47758fd5-1301-49ce-a6c7-bae9eeae6501', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (645, N'delete', 0, N'DELETE FROM CMS_WebPartCategory WHERE [CategoryID] = @ID', 0, 424, 0, '20090827 15:32:53', 'd6c9e526-357d-453e-a041-601b687551d1', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (638, N'update', 0, N'UPDATE CMS_WebPartCategory SET [CategoryDisplayName] = @CategoryDisplayName, [CategoryParentID] = @CategoryParentID, [CategoryName] = @CategoryName, [CategoryGUID] = @CategoryGUID, [CategoryLastModified] = @CategoryLastModified, [CategoryImagePath] = @CategoryImagePath, [CategoryPath] = @CategoryPath, [CategoryOrder] = @CategoryOrder, [CategoryLevel] = @CategoryLevel, [CategoryChildCount] = @CategoryChildCount, [CategoryWebPartChildCount] = @CategoryWebPartChildCount WHERE [CategoryID] = @CategoryID', 0, 424, 0, '20090827 15:32:53', 'cdc44eed-1476-41bb-9152-b70559afe46f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (640, N'insert', 0, N'INSERT INTO CMS_WebPartCategory ([CategoryDisplayName], [CategoryParentID], [CategoryName], [CategoryGUID], [CategoryLastModified], [CategoryImagePath], [CategoryPath], [CategoryOrder], [CategoryLevel], [CategoryChildCount], [CategoryWebPartChildCount] ) VALUES ( @CategoryDisplayName, @CategoryParentID, @CategoryName, @CategoryGUID, @CategoryLastModified, @CategoryImagePath, @CategoryPath, @CategoryOrder, @CategoryLevel, @CategoryChildCount, @CategoryWebPartChildCount); SELECT SCOPE_IDENTITY() AS [CategoryID]', 1, 424, 0, '20090827 15:32:53', '5504ba96-e47a-4d54-8811-fe8afba6e7a8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (589, N'addRoleToStep', 0, N'INSERT INTO CMS_WorkflowStepRoles (RoleID,StepID) VALUES (@RoleID,@StepID)', 1, 172, 0, '20080313 09:35:00', 'bb67cb48-0761-445e-b7a2-f1eb4978d507', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (602, N'update', 0, N'UPDATE CMS_PageTemplateCategory SET [CategoryDisplayName] = @CategoryDisplayName, [CategoryParentID] = @CategoryParentID, [CategoryName] = @CategoryName, [CategoryGUID] = @CategoryGUID, [CategoryLastModified] = @CategoryLastModified, [CategoryImagePath] = @CategoryImagePath, [CategoryChildCount] = @CategoryChildCount, [CategoryTemplateChildCount] = @CategoryTemplateChildCount, [CategoryPath] = @CategoryPath, [CategoryOrder] = @CategoryOrder, [CategoryLevel] = @CategoryLevel WHERE [CategoryID] = @CategoryID', 0, 405, 0, '20091103 08:50:35', 'd730a843-f23c-4f48-9655-662f28561a92', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (558, N'getfirststep', 0, N'SELECT TOP 1 * FROM CMS_WorkflowStep WHERE StepWorkflowID = @StepWorkflowID ORDER BY StepOrder ASC', 0, 172, 0, '20080313 09:35:00', 'a8501403-bcb2-43f2-a123-2772d3981fbb', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (469, N'clearacls', 1, N'Proc_CMS_ACL_ClearACLs', 1, 233, 0, '20080313 09:35:00', 'a60e8249-ce2e-4f0d-8ecc-04740619e11e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (487, N'updateaclid', 0, N'UPDATE CMS_Tree SET NodeACLID = @ACLID WHERE NodeID = @NodeID', 1, 143, 0, '20080313 09:35:00', '45eeeea1-85b2-41c4-8cd2-e9bb5ab2712a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (467, N'getnodescope', 0, N'SELECT TOP 1 * 
FROM CMS_WorkflowScope 
WHERE ScopeSiteID = @ScopeSiteID 
AND (ScopeClassID = @ScopeClassID 
OR ScopeClassID IS NULL) 
AND (ScopeCultureID = @ScopeCultureID 
OR ScopeCultureID IS NULL) 
AND (ScopeStartingPath = ''/'' 
OR @NodeAliasPath LIKE ScopeStartingPath + ''/%'' 
OR @NodeAliasPath LIKE ScopeStartingPath) 
ORDER BY ScopeClassID DESC,ScopeCultureID DESC, ScopeStartingPath DESC', 0, 175, 0, '20090415 17:55:06', '13ed12da-1ca9-49c3-98e5-4cb93ead99df', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (438, N'destroydocumenthistory', 1, N'Proc_CMS_VersionHistory_DestroyDocumentHistory', 1, 214, 0, '20080313 09:35:00', 'cf54d225-09ee-45f2-9b06-d91c653fe95d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (461, N'insert', 0, N'INSERT INTO CMS_ACLItem ([ACLID], [UserID], [RoleID], [Allowed], [Denied], [LastModified], [LastModifiedByUserID] ) VALUES ( @ACLID, @UserID, @RoleID, @Allowed, @Denied, @LastModified, @LastModifiedByUserID); SELECT SCOPE_IDENTITY() AS [ACLItemID]', 1, 225, 0, '20081229 09:06:53', '5d1650e4-a958-4cd7-9269-b96728a37a0b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (462, N'update', 0, N'UPDATE CMS_ACLItem SET [ACLID] = @ACLID, [UserID] = @UserID, [RoleID] = @RoleID, [Allowed] = @Allowed, [Denied] = @Denied, [LastModified] = @LastModified, [LastModifiedByUserID] = @LastModifiedByUserID WHERE [ACLItemID] = @ACLItemID', 0, 225, 0, '20081229 09:06:53', '9f059053-f746-4076-b6c9-77394a6396ff', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (422, N'isauthorizedpernode', 1, N'Proc_CMS_User_IsAuthorizedPerNode', 0, 59, 0, '20080313 09:35:00', '8ae444bc-d233-429e-a44a-e8e7e42aa205', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (287, N'RemovePageTemplateFromSite', 0, N'DELETE FROM CMS_PageTemplateSite WHERE (PageTemplateID=@PageTemplateID AND SiteID=@SiteID)', 1, 157, 0, '20080313 09:35:00', '01de38d8-bd93-467b-b4ff-ecf6722c9b06', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (413, N'insert', 0, N'INSERT INTO CMS_WorkflowScope ([ScopeStartingPath], [ScopeWorkflowID], [ScopeClassID], [ScopeSiteID], [ScopeGUID], [ScopeLastModified], [ScopeCultureID] ) VALUES ( @ScopeStartingPath, @ScopeWorkflowID, @ScopeClassID, @ScopeSiteID, @ScopeGUID, @ScopeLastModified, @ScopeCultureID); SELECT SCOPE_IDENTITY() AS [ScopeID]', 1, 175, 0, '20090415 18:09:50', '69dfcb28-5775-4576-9bb7-be00b2935e14', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (414, N'update', 0, N'UPDATE CMS_WorkflowScope SET [ScopeStartingPath] = @ScopeStartingPath, [ScopeWorkflowID] = @ScopeWorkflowID, [ScopeClassID] = @ScopeClassID, [ScopeSiteID] = @ScopeSiteID, [ScopeGUID] = @ScopeGUID, [ScopeLastModified] = @ScopeLastModified, [ScopeCultureID] = @ScopeCultureID WHERE [ScopeID] = @ScopeID', 0, 175, 0, '20090415 18:09:32', '07d2a262-2062-4634-af19-45676ce929c1', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (327, N'intoolsmenu', 0, N'SELECT * FROM CMS_Resource WHERE ShowInToolsMenu = 1 AND ResourceUrl != '''' AND ResourceUrl IS NOT NULL ORDER BY ##ORDERBY##', 0, 134, 0, '20080313 09:35:00', '9950ee1b-fa0b-4fcb-8fa3-4e923db370a5', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (328, N'removesiteroles', 1, N'Proc_CMS_User_RemoveSiteRoles', 0, 59, 0, '20080313 09:35:00', '088300d5-bb29-422a-9c64-5e103851a99e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (336, N'deleteroot', 1, N'Proc_CMS_Site_DeleteRoot', 1, 143, 0, '20080313 09:35:00', '41def94d-a78f-4181-ade5-a6e98b1a7a40', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1306, N'inlinecontrolsite', 0, N'SELECT *  FROM CMS_InlineControlSite WHERE ControlID=@ControlID', 0, 877, 0, '20080313 09:35:00', '958fe612-94bc-40ac-8061-a8b53f6af26b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1309, N'isinsite', 0, N'SELECT * FROM CMS_InlineControlSite WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 877, 0, '20080313 09:35:00', 'f6435dfd-e483-42db-a80f-861146eb40ae', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1310, N'addtosite', 0, N'INSERT INTO CMS_InlineControlSite (ControlID,SiteID) VALUES (@ControlID,@SiteID)', 0, 877, 0, '20080313 09:35:00', 'ff62ef72-05a7-401b-8f3f-c3a5f883f1c6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1312, N'removefromsite', 0, N'DELETE FROM CMS_InlineControlSite WHERE ControlID = @ControlID AND SiteID = @SiteID', 0, 877, 0, '20080313 09:35:00', '1078fcdc-0ab1-4272-8687-5201a038756a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1335, N'insertsubscription', 0, N'INSERT INTO [Newsletter_SubscriberNewsletter] ([SubscriberID], [NewsletterID], [SubscribedWhen]) VALUES ( @SubscriberID,  @NewsletterID, @SubscribedWhen)', 0, 912, 0, '20080313 09:35:00', '020b2de3-aab4-42de-9744-47a28aa95a43', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1368, N'delete', 0, N'DELETE FROM Newsletter_Emails WHERE [EmailID] = @ID', 0, 919, 0, '20081229 09:07:13', '03d469f3-c947-46bd-8c85-ff4ae9903124', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1369, N'insert', 0, N'INSERT INTO Newsletter_Emails ([EmailNewsletterIssueID], [EmailSubscriberID], [EmailSiteID], [EmailLastSendResult], [EmailLastSendAttempt], [EmailSending], [EmailGUID], [EmailLastModified] ) VALUES ( @EmailNewsletterIssueID, @EmailSubscriberID, @EmailSiteID, @EmailLastSendResult, @EmailLastSendAttempt, @EmailSending, @EmailGUID, @EmailLastModified); SELECT SCOPE_IDENTITY() AS [EmailID]', 1, 919, 0, '20081229 09:07:13', 'd7171aa5-37f7-4080-88cf-d07e3cf28e4f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1370, N'update', 0, N'UPDATE Newsletter_Emails SET [EmailNewsletterIssueID] = @EmailNewsletterIssueID, [EmailSubscriberID] = @EmailSubscriberID, [EmailSiteID] = @EmailSiteID, [EmailLastSendResult] = @EmailLastSendResult, [EmailLastSendAttempt] = @EmailLastSendAttempt, [EmailSending] = @EmailSending, [EmailGUID] = @EmailGUID, [EmailLastModified] = @EmailLastModified WHERE [EmailID] = @EmailID', 0, 919, 0, '20081229 09:07:13', '2581e096-0b94-4e3c-b38f-dc263036242d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2039, N'getlaststepaction', 0, N'SELECT TOP 1 * FROM CMS_WorkflowHistory WHERE VersionHistoryID IN (SELECT VersionHistoryID FROM CMS_VersionHistory WHERE DocumentID = @DocumentID) AND StepID = @WorkflowStepID AND WasRejected = @WasRejected ORDER BY WorkflowHistoryID DESC', 0, 298, 0, '20080313 09:35:00', 'f33e1d13-bba5-496b-9164-8f6c437e8529', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2180, N'delete', 0, N'DELETE FROM CMS_WebFarmServer WHERE [ServerID] = @ID', 0, 1093, 0, '20081229 09:07:40', 'e958d2dd-c6a5-4e82-a42a-2cc5fd9ae577', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2181, N'insert', 0, N'INSERT INTO CMS_WebFarmServer ([ServerDisplayName], [ServerName], [ServerURL], [ServerGUID], [ServerLastModified], [ServerEnabled], [ServerLastUpdated] ) VALUES ( @ServerDisplayName, @ServerName, @ServerURL, @ServerGUID, @ServerLastModified, @ServerEnabled, @ServerLastUpdated); SELECT SCOPE_IDENTITY() AS [ServerID]', 1, 1093, 0, '20081229 09:07:40', '3ad4f431-8c07-40b3-9f9c-20c99511f72d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2182, N'update', 0, N'UPDATE CMS_WebFarmServer SET [ServerDisplayName] = @ServerDisplayName, [ServerName] = @ServerName, [ServerURL] = @ServerURL, [ServerGUID] = @ServerGUID, [ServerLastModified] = @ServerLastModified, [ServerEnabled] = @ServerEnabled, [ServerLastUpdated] = @ServerLastUpdated WHERE [ServerID] = @ServerID', 0, 1093, 0, '20081229 09:07:40', '47a71e26-349f-46d1-8248-a24dbafba328', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2157, N'deleteaclsandaclitems', 1, N'Proc_CMS_ACL_DeleteACLsAndACLItems', 1, 233, 0, '20080313 09:35:00', 'b50b7068-dc2f-4c34-8a69-16708c343d7a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2176, N'update', 0, N'UPDATE CMS_EventLog SET [EventType] = @EventType, [EventTime] = @EventTime, [Source] = @Source, [EventCode] = @EventCode, [UserID] = @UserID, [UserName] = @UserName, [IPAddress] = @IPAddress, [NodeID] = @NodeID, [DocumentName] = @DocumentName, [EventDescription] = @EventDescription, [SiteID] = @SiteID, [EventUrl] = @EventUrl, [EventMachineName] = @EventMachineName, [EventUserAgent] = @EventUserAgent, [EventUrlReferrer] = @EventUrlReferrer WHERE [EventID] = @EventID', 0, 140, 0, '20100219 08:36:37', '1310ab50-db8c-4285-b592-efe979f9d067', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1392, N'delete', 0, N'DELETE FROM CMS_LicenseKey WHERE [LicenseKeyID] = @ID', 0, 930, 0, '20091211 15:01:08', '00f827c6-6092-4671-bd36-bb147a9f8dc7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1393, N'insert', 0, N'INSERT INTO CMS_LicenseKey ([LicenseDomain], [LicenseKey], [LicenseEdition], [LicenseExpiration], [LicensePackages], [LicenseServers] ) VALUES ( @LicenseDomain, @LicenseKey, @LicenseEdition, @LicenseExpiration, @LicensePackages, @LicenseServers); SELECT SCOPE_IDENTITY() AS [LicenseKeyID]', 1, 930, 0, '20091211 15:01:08', '47c87417-ea44-4805-827f-8eac844ca58d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2427, N'clearwebfarmservertask', 1, N'Proc_CMS_Webfarm_DeleteAll', 0, 1094, 0, '20080313 09:35:00', 'f9c7f011-1504-433e-a4bd-849ef15b28e1', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2554, N'insert', 0, N'INSERT INTO Staging_Synchronization ([SynchronizationTaskID], [SynchronizationServerID], [SynchronizationLastRun], [SynchronizationErrorMessage] ) VALUES ( @SynchronizationTaskID, @SynchronizationServerID, @SynchronizationLastRun, @SynchronizationErrorMessage); SELECT SCOPE_IDENTITY() AS [SynchronizationID]', 1, 1131, 0, '20081229 09:07:24', 'b09a3461-65c5-4904-b9ec-d6423e594bbc', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2555, N'update', 0, N'UPDATE Staging_Synchronization SET [SynchronizationTaskID] = @SynchronizationTaskID, [SynchronizationServerID] = @SynchronizationServerID, [SynchronizationLastRun] = @SynchronizationLastRun, [SynchronizationErrorMessage] = @SynchronizationErrorMessage WHERE [SynchronizationID] = @SynchronizationID', 0, 1131, 0, '20081229 09:07:24', 'c3a6264d-75b7-4ef6-8838-d4f2dc12a584', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2484, N'update', 0, N'UPDATE Forums_ForumSubscription SET [SubscriptionUserID] = @SubscriptionUserID, [SubscriptionEmail] = @SubscriptionEmail, [SubscriptionForumID] = @SubscriptionForumID, [SubscriptionPostID] = @SubscriptionPostID, [SubscriptionGUID] = @SubscriptionGUID, [SubscriptionLastModified] = @SubscriptionLastModified WHERE [SubscriptionID] = @SubscriptionID', 0, 1124, 0, '20081229 09:07:08', 'fd186954-70c8-494e-a0be-b900b16f159c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2052, N'updatedocumentnamepath', 1, N'Proc_CMS_Document_UpdateDocumentNamePath', 1, 144, 0, '20080313 09:35:00', 'cd7dbe26-53a4-4a64-ad7e-fac9458e0818', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2502, N'GetChildPosts', 0, N'SELECT *  FROM  [Forums_ForumPost] WHERE PostIDPath LIKE @Path + ''/%''', 0, 1123, 0, '20080313 09:35:00', '2a441159-f00c-4436-beb5-5064d87947a8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2503, N'InitGroupOrder', 1, N'Proc_Forums_ForumGroup_InitNodeOrders', 1, 1121, 0, '20080313 09:35:00', 'b8156835-8013-4947-b0be-f9f405969225', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2504, N'InitForumOrder', 1, N'Proc_Forums_Forum_InitNodeOrders', 1, 1122, 0, '20080313 09:35:00', 'fa8865fe-89d1-4e66-b335-13c92696e512', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2505, N'MoveGroupUp', 1, N'Proc_Forums_ForumGroup_MoveNodeUp', 1, 1121, 0, '20080313 09:35:00', 'a29272a0-53b9-40bc-a71a-aa2f07b2aaa8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2506, N'MoveGroupDown', 1, N'Proc_Forums_ForumGroup_MoveNodeDown', 1, 1121, 0, '20080313 09:35:00', 'b2561532-7a04-4a2f-a02f-a17165928956', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2507, N'MoveForumUp', 1, N'Proc_Forums_Forum_MoveNodeUp', 1, 1122, 0, '20080313 09:35:00', '6fa77cf6-f052-4af2-b12d-a471e9fde617', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2509, N'MoveForumDown', 1, N'Proc_Forums_Forum_MoveNodeDown', 1, 1122, 0, '20080313 09:35:00', '1f564875-7fba-4e6c-abf5-85d031d6ed8f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2553, N'delete', 0, N'DELETE FROM Staging_Synchronization WHERE [SynchronizationID] = @ID', 0, 1131, 0, '20081229 09:07:24', 'b5228a6c-f761-4137-9396-9435cbaeb04c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2542, N'UpdateForumCounts', 1, N'Proc_Forums_Forum_UpdateForumCounts', 0, 1122, 0, '20080313 09:35:00', 'a41874ac-f56d-4efa-a613-756f023bc5fa', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2540, N'GetRoleNameForForum', 0, N'SELECT [ROLENAME] FROM [CMS_ROLE] WHERE [ROLEID] IN (SELECT ROLEID FROM [FORUMS_FORUMROLES] WHERE ForumID = @ID)', 0, 1122, 0, '20080313 09:35:00', '8d72becc-b575-4150-8ec5-95db0d23caa3', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2604, N'RemoveDependencies', 1, N'Proc_Forums_Forum_RemoveDependencies', 0, 1122, 0, '20080313 09:35:00', '753645bc-4efc-47e1-805e-50ef3deaa25a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2605, N'RemoveDependencies', 1, N'Proc_Forums_ForumGroup_RemoveDependencies', 0, 1121, 0, '20080313 09:35:00', '1388a866-fbbf-4d1a-92d5-4d28e12d02c3', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2593, N'deletetasksynchronization', 0, N'DELETE FROM Staging_Synchronization WHERE SynchronizationTaskID = @TaskID AND (SynchronizationServerID = @ServerID OR (@ServerID = 0 AND (@SiteID = 0 OR SynchronizationServerID IN (SELECT ServerID FROM Staging_Server WHERE ServerSiteID = @SiteID AND ServerEnabled=1))))', 1, 1131, 0, '20091125 16:12:12', '41d71d2c-6233-43a7-9afa-a0be372a5045', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2631, N'clearlog', 0, N'DELETE FROM Staging_SyncLog WHERE (SyncLogTaskID = @TaskID OR @TaskID = 0) AND (SyncLogServerID = @ServerID OR @ServerID = 0)', 1, 1133, 0, '20080313 09:35:00', '422c8233-351a-4e0b-b72d-5663c339b0e5', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2689, N'CheckDependencies', 0, N'SELECT TOP 1 SKUInternalStatusID FROM [COM_SKU] WHERE SKUInternalStatusID=@ID', 0, 1147, 0, '20080313 09:35:00', '1895920c-e358-4c5b-82fc-14e1fbf9fed2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2665, N'CheckDependencies', 0, N'SELECT TOP 1 CurrencyID FROM [COM_Currency] WHERE ((CurrencyID = (SELECT TOP 1 [CustomerPreferredCurrencyID] FROM [COM_Customer] WHERE CustomerPreferredCurrencyID=@ID)) OR (CurrencyID = (SELECT TOP 1 [OrderCurrencyID] FROM [COM_Order] WHERE OrderCurrencyID=@ID)) OR (CurrencyID = (SELECT  TOP 1 [ShoppingCartCurrencyID] FROM [COM_ShoppingCart] WHERE ShoppingCartCurrencyID=@ID)) )', 0, 1143, 0, '20080313 09:35:00', 'e3a55205-f315-49fa-aa3a-abed9e9c84ec', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2974, N'CheckDependencies', 0, N'SELECT TOP 1 SKUSupplierID FROM [COM_SKU] WHERE SKUSupplierID = @ID', 0, 1141, 0, '20080313 09:35:00', 'a933fbbd-1ad6-477a-8020-7da6133a9173', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2979, N'CheckDependencies', 0, N'SELECT StateID FROM CMS_State WHERE (StateID IN (SELECT AddressStateID FROM COM_Address WHERE AddressStateID=@ID) OR StateID IN (SELECT CustomerStateID FROM COM_Customer WHERE CustomerStateID=@ID) OR StateID IN (SELECT TOP 1 StateID FROM COM_TaxClassState WHERE StateID=@ID))', 0, 1126, 0, '20080313 09:35:00', '4a7bf657-2450-4c8b-8dfb-cdd268d9f557', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2980, N'CheckDependencies', 0, N'SELECT CountryID FROM CMS_Country WHERE (CountryID IN (SELECT AddressCountryID FROM COM_Address WHERE AddressCountryID=@ID) OR CountryID IN (SELECT CustomerCountryID FROM COM_Customer WHERE CustomerCountryID=@ID) OR CountryID IN (SELECT CountryID FROM CMS_State WHERE CountryID=@ID) OR CountryID IN (SELECT CountryID FROM COM_TaxClassCountry WHERE CountryID=@ID))', 0, 1125, 0, '20080313 09:35:00', '9bf2291f-d217-4642-bd3e-f22503d9cef6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2833, N'addroletoforum', 0, N'INSERT INTO Forums_ForumRoles (RoleID, ForumID) VALUES (@RoleID, @ForumID)', 0, 1122, 0, '20080313 09:35:00', '6e4b77f9-1da2-4ff7-af51-7572b9907575', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2834, N'removerolefromforum', 0, N'DELETE FROM Forums_ForumRoles WHERE RoleID=@RoleID AND ForumID=@ForumID', 0, 1122, 0, '20080313 09:35:00', '38c91942-8746-40de-8c12-1bb0469949b6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2835, N'isroleallowedforforum', 0, N'SELECT * FROM Forums_ForumRoles WHERE RoleID=@RoleID AND ForumID=@ForumID', 0, 1122, 0, '20080313 09:35:00', '06211c48-a189-41b6-9979-1d6527f73d7a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3020, N'ChangeCulture', 1, N'Proc_CMS_Document_ChangeCulture', 1, 143, 0, '20080313 09:35:00', '46d089c0-7eef-449d-b15b-e067337cba6d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3021, N'isanydocument', 0, N'Select Top 1 *  FROM CMS_Document WHERE (DocumentCulture = @Culture) AND (DocumentNodeID IN (SELECT NodeID FROM CMS_Tree WHERE NodeSiteID = @SiteId))', 0, 1, 0, '20080313 09:35:00', '859ca297-b032-4670-b21a-f836dab385e0', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3145, N'delete', 0, N'DELETE FROM COM_CurrencyExchangeRate WHERE [ExchagneRateID] = @ID', 0, 1202, 0, '20081229 09:07:00', '9872314b-5468-49f6-8363-726bb633a55d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3146, N'insert', 0, N'INSERT INTO COM_CurrencyExchangeRate ([ExchangeRateToCurrencyID], [ExchangeRateValue], [ExchangeTableID], [ExchangeRateGUID], [ExchangeRateLastModified] ) VALUES ( @ExchangeRateToCurrencyID, @ExchangeRateValue, @ExchangeTableID, @ExchangeRateGUID, @ExchangeRateLastModified); SELECT SCOPE_IDENTITY() AS [ExchagneRateID]', 1, 1202, 0, '20081229 09:07:00', '711933d7-bf88-4bb9-8af2-4c39ecd93828', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3147, N'update', 0, N'UPDATE COM_CurrencyExchangeRate SET [ExchangeRateToCurrencyID] = @ExchangeRateToCurrencyID, [ExchangeRateValue] = @ExchangeRateValue, [ExchangeTableID] = @ExchangeTableID, [ExchangeRateGUID] = @ExchangeRateGUID, [ExchangeRateLastModified] = @ExchangeRateLastModified WHERE [ExchagneRateID] = @ExchagneRateID', 0, 1202, 0, '20081229 09:07:00', '9000f372-56ed-4e27-a8b4-95179c25e369', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3295, N'GetParentProperty', 0, N'SELECT TOP 1 ##COLUMNS## FROM View_CMS_Tree_Joined WHERE ((DocumentNodeID IN (SELECT NodeID FROM CMS_TREE WHERE NodeSiteID = @SiteID ))AND(NodeAliasPath=''/'' OR @AliasPath LIKE NodeAliasPath+''/%'')AND(##WHERE##) ) ORDER BY NodeAliasPath DESC', 0, 143, 0, '20090819 19:02:35', '251abddc-c61c-41e5-bb8e-d8de11adc040', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3200, N'updatechildnodescount', 1, N'Proc_CMS_Tree_UpdateChildNodesCount', 1, 143, 0, '20080313 09:35:00', '54ce5fec-4659-43ce-a587-0a9e1fca7ad6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3396, N'delete', 0, N'DELETE FROM Reporting_Report WHERE [ReportID] = @ID', 0, 1338, 0, '20100325 18:30:53', 'd9964490-a7f6-43a9-9d2d-5e5b418f6d40', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3397, N'insert', 0, N'INSERT INTO Reporting_Report ([ReportName], [ReportDisplayName], [ReportLayout], [ReportParameters], [ReportCategoryID], [ReportAccess], [ReportGUID], [ReportLastModified] ) VALUES ( @ReportName, @ReportDisplayName, @ReportLayout, @ReportParameters, @ReportCategoryID, @ReportAccess, @ReportGUID, @ReportLastModified); SELECT SCOPE_IDENTITY() AS [ReportID]', 1, 1338, 0, '20100325 18:30:53', '024344bf-e068-4e70-9075-8a0694fa0600', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3398, N'update', 0, N'UPDATE Reporting_Report SET [ReportName] = @ReportName, [ReportDisplayName] = @ReportDisplayName, [ReportLayout] = @ReportLayout, [ReportParameters] = @ReportParameters, [ReportCategoryID] = @ReportCategoryID, [ReportAccess] = @ReportAccess, [ReportGUID] = @ReportGUID, [ReportLastModified] = @ReportLastModified WHERE [ReportID] = @ReportID', 0, 1338, 0, '20100325 18:30:53', 'fb6e7a82-d70f-4483-b577-df1918c3e5ca', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3341, N'delete', 0, N'DELETE FROM Polls_PollAnswer WHERE [AnswerID] = @ID', 0, 1331, 0, '20081229 09:07:16', '855478a2-14b7-4c20-8f39-de29e78ed03f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3342, N'insert', 0, N'INSERT INTO Polls_PollAnswer ([AnswerText], [AnswerOrder], [AnswerCount], [AnswerEnabled], [AnswerPollID], [AnswerGUID], [AnswerLastModified] ) VALUES ( @AnswerText, @AnswerOrder, @AnswerCount, @AnswerEnabled, @AnswerPollID, @AnswerGUID, @AnswerLastModified); SELECT SCOPE_IDENTITY() AS [AnswerID]', 1, 1331, 0, '20081229 09:07:16', '8f850ce7-779f-480d-8b75-2cc3542fea5c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3343, N'update', 0, N'UPDATE Polls_PollAnswer SET [AnswerText] = @AnswerText, [AnswerOrder] = @AnswerOrder, [AnswerCount] = @AnswerCount, [AnswerEnabled] = @AnswerEnabled, [AnswerPollID] = @AnswerPollID, [AnswerGUID] = @AnswerGUID, [AnswerLastModified] = @AnswerLastModified WHERE [AnswerID] = @AnswerID', 0, 1331, 0, '20081229 09:07:16', '29c7d08d-e55e-4fca-86e4-77583d76b214', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3411, N'delete', 0, N'DELETE FROM Reporting_ReportTable WHERE [TableID] = @ID', 0, 1341, 0, '20081229 09:07:22', '951d861e-9348-4175-bc0d-958184ee5225', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3412, N'insert', 0, N'INSERT INTO Reporting_ReportTable ([TableName], [TableDisplayName], [TableQuery], [TableQueryIsStoredProcedure], [TableReportID], [TableSettings], [TableGUID], [TableLastModified] ) VALUES ( @TableName, @TableDisplayName, @TableQuery, @TableQueryIsStoredProcedure, @TableReportID, @TableSettings, @TableGUID, @TableLastModified); SELECT SCOPE_IDENTITY() AS [TableID]', 1, 1341, 0, '20081229 09:07:22', 'f6777667-6df3-4435-888e-89d96a390905', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3413, N'update', 0, N'UPDATE Reporting_ReportTable SET [TableName] = @TableName, [TableDisplayName] = @TableDisplayName, [TableQuery] = @TableQuery, [TableQueryIsStoredProcedure] = @TableQueryIsStoredProcedure, [TableReportID] = @TableReportID, [TableSettings] = @TableSettings, [TableGUID] = @TableGUID, [TableLastModified] = @TableLastModified WHERE [TableID] = @TableID', 0, 1341, 0, '20081229 09:07:22', '375e428d-7269-46a1-8393-24910bfc481a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3416, N'delete', 0, N'DELETE FROM Reporting_ReportValue WHERE [ValueID] = @ID', 0, 1342, 0, '20081229 09:07:22', 'd027129c-b315-4de2-a53c-8bfca124a5ab', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3417, N'insert', 0, N'INSERT INTO Reporting_ReportValue ([ValueName], [ValueDisplayName], [ValueQuery], [ValueQueryIsStoredProcedure], [ValueFormatString], [ValueReportID], [ValueGUID], [ValueLastModified] ) VALUES ( @ValueName, @ValueDisplayName, @ValueQuery, @ValueQueryIsStoredProcedure, @ValueFormatString, @ValueReportID, @ValueGUID, @ValueLastModified); SELECT SCOPE_IDENTITY() AS [ValueID]', 1, 1342, 0, '20081229 09:07:22', '5ecd4207-c985-49ed-9b63-a9d20bd87f09', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3418, N'update', 0, N'UPDATE Reporting_ReportValue SET [ValueName] = @ValueName, [ValueDisplayName] = @ValueDisplayName, [ValueQuery] = @ValueQuery, [ValueQueryIsStoredProcedure] = @ValueQueryIsStoredProcedure, [ValueFormatString] = @ValueFormatString, [ValueReportID] = @ValueReportID, [ValueGUID] = @ValueGUID, [ValueLastModified] = @ValueLastModified WHERE [ValueID] = @ValueID', 0, 1342, 0, '20081229 09:07:22', '7274f68c-c506-4b20-9975-f7f4aa3dd519', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3476, N'insert', 0, N'INSERT INTO Reporting_SavedReport ([SavedReportReportID], [SavedReportGUID], [SavedReportTitle], [SavedReportDate], [SavedReportHTML], [SavedReportParameters], [SavedReportCreatedByUserID], [SavedReportLastModified] ) VALUES ( @SavedReportReportID, @SavedReportGUID, @SavedReportTitle, @SavedReportDate, @SavedReportHTML, @SavedReportParameters, @SavedReportCreatedByUserID, @SavedReportLastModified); SELECT SCOPE_IDENTITY() AS [SavedReportID]', 1, 1350, 0, '20081229 09:07:21', '0ca99fbd-6d2d-4e01-9fb7-58fd1827cdac', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3477, N'update', 0, N'UPDATE Reporting_SavedReport SET [SavedReportReportID] = @SavedReportReportID, [SavedReportGUID] = @SavedReportGUID, [SavedReportTitle] = @SavedReportTitle, [SavedReportDate] = @SavedReportDate, [SavedReportHTML] = @SavedReportHTML, [SavedReportParameters] = @SavedReportParameters, [SavedReportCreatedByUserID] = @SavedReportCreatedByUserID, [SavedReportLastModified] = @SavedReportLastModified WHERE [SavedReportID] = @SavedReportID', 0, 1350, 0, '20081229 09:07:21', 'f99dc190-fffa-4d85-b0b9-2751d18b788a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3509, N'deleteanswers', 0, N'DELETE FROM Polls_PollAnswer WHERE AnswerPollID=@ID', 0, 1331, 0, '20080313 09:35:00', '0ce7cd0a-d4c9-487c-aa44-5b0d55ccefe7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3510, N'resetanswers', 0, N'UPDATE Polls_PollAnswer SET [AnswerCount] = 0 WHERE [AnswerPollID] = @ID', 0, 1331, 0, '20080313 09:35:00', '72bb7bd1-c8bd-4eb5-a832-9511e65b875c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3549, N'delete', 0, N'DELETE FROM Blog_Comment WHERE [CommentID] = @ID', 0, 1360, 0, '20090107 14:29:28', 'cf01379d-aeee-4e8d-b42d-fda4a3cd2eb0', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3550, N'insert', 0, N'INSERT INTO Blog_Comment ([CommentUserName], [CommentUserID], [CommentUrl], [CommentText], [CommentApprovedByUserID], [CommentPostDocumentID], [CommentDate], [CommentIsSpam], [CommentApproved], [CommentIsTrackBack], [CommentEmail] ) VALUES ( @CommentUserName, @CommentUserID, @CommentUrl, @CommentText, @CommentApprovedByUserID, @CommentPostDocumentID, @CommentDate, @CommentIsSpam, @CommentApproved, @CommentIsTrackBack, @CommentEmail); SELECT SCOPE_IDENTITY() AS [CommentID]', 1, 1360, 0, '20090107 14:29:28', 'b3da6dce-1200-4176-8347-4ccce462b752', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3551, N'update', 0, N'UPDATE Blog_Comment SET [CommentUserName] = @CommentUserName, [CommentUserID] = @CommentUserID, [CommentUrl] = @CommentUrl, [CommentText] = @CommentText, [CommentApprovedByUserID] = @CommentApprovedByUserID, [CommentPostDocumentID] = @CommentPostDocumentID, [CommentDate] = @CommentDate, [CommentIsSpam] = @CommentIsSpam, [CommentApproved] = @CommentApproved, [CommentIsTrackBack] = @CommentIsTrackBack, [CommentEmail] = @CommentEmail WHERE [CommentID] = @CommentID', 0, 1360, 0, '20090107 14:29:28', 'fa09b860-65d2-4281-94e7-47329ce97d77', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3591, N'movenodelast', 1, N'Proc_CMS_Tree_MoveNodeLast', 1, 143, 0, '20080313 09:35:00', '04ccfd74-bcda-44fc-b702-2c28de029e47', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3592, N'movenodefirst', 1, N'Proc_CMS_Tree_MoveNodeFirst', 1, 143, 0, '20080313 09:35:00', '318773be-54f0-4044-b49e-829af4d0f7fa', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3593, N'movenodealphabetical', 1, N'Proc_CMS_Tree_MoveNodeAlphabetical', 1, 143, 0, '20080313 09:35:00', 'e609b3ff-a9cc-4354-88fd-1b7731f01199', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3823, N'removedependencies', 1, N'Proc_Analytics_Statistics_RemoveDependencies', 1, 1366, 0, '20080313 09:35:00', '9a9a64a0-f5b5-4937-982d-466558a749f6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3475, N'delete', 0, N'DELETE FROM Reporting_SavedReport WHERE [SavedReportID] = @ID', 0, 1350, 0, '20081229 09:07:21', 'da15c27c-f992-4ae0-9430-979cad7e7c38', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3637, N'processlog', 1, N'Proc_Analytics_ProcessLog', 1, 1366, 0, '20080313 09:35:00', 'c6e6fc63-17a4-49aa-80a7-eee4684f6adc', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3718, N'updatesiteid', 0, N'UPDATE CMS_VersionHistory SET NodeSiteID = @NewSiteID WHERE DocumentID = @DocumentID', 1, 214, 0, '20080313 09:35:00', 'ef55dfb5-6b67-418e-aaaf-8cf9bd6faea6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3743, N'removeDependencies', 1, N'Proc_Reporting_Report_RemoveDependencies', 1, 1338, 0, '20080313 09:35:00', '95755318-6736-4a6b-bb69-d20e45e17825', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3744, N'removeDependencies', 1, N'Proc_Reporting_SavedReports_RemoveDependencies', 1, 1350, 0, '20080313 09:35:00', '60a2a645-3ff8-402f-8f01-2275cfa04b94', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3795, N'delete', 0, N'DELETE FROM COM_VolumeDiscount WHERE [VolumeDiscountID] = @ID', 0, 1424, 0, '20081229 09:07:03', 'c7630411-0ebc-44d6-96e8-6e735d8a5c90', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3796, N'insert', 0, N'INSERT INTO COM_VolumeDiscount ([VolumeDiscountSKUID], [VolumeDiscountMinCount], [VolumeDiscountValue], [VolumeDiscountIsFlatValue], [VolumeDiscountGUID], [VolumeDiscountLastModified] ) VALUES ( @VolumeDiscountSKUID, @VolumeDiscountMinCount, @VolumeDiscountValue, @VolumeDiscountIsFlatValue, @VolumeDiscountGUID, @VolumeDiscountLastModified); SELECT SCOPE_IDENTITY() AS [VolumeDiscountID]', 1, 1424, 0, '20081229 09:07:03', '2bde1808-ffd5-4f65-b8d1-2e28eafb795c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3797, N'update', 0, N'UPDATE COM_VolumeDiscount SET [VolumeDiscountSKUID] = @VolumeDiscountSKUID, [VolumeDiscountMinCount] = @VolumeDiscountMinCount, [VolumeDiscountValue] = @VolumeDiscountValue, [VolumeDiscountIsFlatValue] = @VolumeDiscountIsFlatValue, [VolumeDiscountGUID] = @VolumeDiscountGUID, [VolumeDiscountLastModified] = @VolumeDiscountLastModified WHERE [VolumeDiscountID] = @VolumeDiscountID', 0, 1424, 0, '20081229 09:07:03', '22fdd783-3788-496c-a730-ab577dc1b048', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3955, N'removedependencies', 1, N'Proc_Reporting_ReportCategory_RemoveDependencies', 1, 1431, 0, '20080313 09:35:00', 'aa151f91-030d-47eb-b331-db785e8df3ab', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4099, N'delete', 0, N'DELETE FROM CMS_EventLog WHERE [EventID] = @ID', 0, 140, 0, '20100219 08:36:37', '1a011053-2894-4e7f-917a-74d831596e4d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4509, N'delete', 0, N'DELETE FROM CMS_Relationship WHERE [LeftNodeID] = @LeftNodeID AND [RightNodeID] = @RightNodeID AND [RelationshipNameID] = @RelationshipNameID', 0, 537, 0, '20081229 09:07:21', '01f3274f-08e0-4e71-8fc2-614042e16807', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4275, N'GetChildWebParts', 0, N'SELECT * FROM CMS_WebPart WHERE WebPartParentID = @ID', 0, 425, 0, '20080313 09:35:00', '7943f595-5b3e-4e5d-b19e-9bdf64e65269', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4219, N'insert', 0, N'INSERT INTO Events_Attendee ([AttendeeEmail], [AttendeeFirstName], [AttendeeLastName], [AttendeePhone], [AttendeeEventNodeID], [AttendeeGUID], [AttendeeLastModified] ) VALUES ( @AttendeeEmail, @AttendeeFirstName, @AttendeeLastName, @AttendeePhone, @AttendeeEventNodeID, @AttendeeGUID, @AttendeeLastModified); SELECT SCOPE_IDENTITY() AS [AttendeeID]', 1, 1511, 0, '20081229 09:07:06', '7468c06e-b595-448b-b511-c28b8f4230c9', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4220, N'update', 0, N'UPDATE Events_Attendee SET [AttendeeEmail] = @AttendeeEmail, [AttendeeFirstName] = @AttendeeFirstName, [AttendeeLastName] = @AttendeeLastName, [AttendeePhone] = @AttendeePhone, [AttendeeEventNodeID] = @AttendeeEventNodeID, [AttendeeGUID] = @AttendeeGUID, [AttendeeLastModified] = @AttendeeLastModified WHERE [AttendeeID] = @AttendeeID', 0, 1511, 0, '20081229 09:07:06', 'c665069c-b67b-4bed-ba00-dc66073c59d5', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4692, N'removerelationships', 0, N'DELETE FROM CMS_ObjectRelationship WHERE ##WHERE##', 0, 1594, 0, '20080313 09:35:00', 'c37bea62-a065-46d4-9bfe-d9caf658aeaf', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4694, N'finduserinsite', 0, N'SELECT ##TOPN## ##COLUMNS## FROM View_CMS_User WHERE (UserID IN (SELECT UserID FROM CMS_UserSite WHERE SiteID=@SiteID)) AND (UserNickName LIKE @Search OR UserName LIKE @Search OR FullName LIKE @Search) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 59, 0, '20091209 16:12:00', '722855d1-ed1c-40bf-aaae-115e61e1c905', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4686, N'delete', 0, N'DELETE FROM CMS_ObjectRelationship WHERE [RelationshipLeftObjectID] = @leftID AND [RelationshipLeftObjectType] = @leftType AND [RelationshipRightObjectID] = @rightID AND [RelationshipRightObjectType] = @rightType AND [RelationshipNameID] = @relationshipNameID', 0, 1594, 1, '20080313 09:35:00', 'fdcd6680-de69-4499-bac3-b87a95959d1f', 2, 1)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4687, N'insert', 0, N'INSERT INTO CMS_ObjectRelationship ( [RelationshipLeftObjectID], [RelationshipLeftObjectType], [RelationshipNameID], [RelationshipRightObjectID], [RelationshipRightObjectType], [RelationshipCustomData] ) VALUES ( @RelationshipLeftObjectID, @RelationshipLeftObjectType, @RelationshipNameID, @RelationshipRightObjectID, @RelationshipRightObjectType, @RelationshipCustomData)', 1, 1594, 1, '20080313 09:35:00', 'a6ff3cff-7d8b-44fd-9fd9-cc6f28b3713e', 2, 1)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4688, N'update', 0, N'UPDATE CMS_ObjectRelationship SET [RelationshipCustomData] = @RelationshipCustomData WHERE [RelationshipLeftObjectID] = @RelationshipLeftObjectID AND [RelationshipLeftObjectType] = @RelationshipLeftObjectType AND [RelationshipRightObjectID] = @RelationshipRightObjectID AND [RelationshipRightObjectType] = @RelationshipRightObjectType AND [RelationshipNameID] = @RelationshipNameID', 0, 1594, 1, '20080313 09:35:00', '5e2b5956-9631-4dac-81bc-836125a8b166', 2, 1)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4760, N'CheckDependencies', 0, N'SELECT TOP 1 SKUID FROM COM_SKU WHERE SKUOptionCategoryID = @ID', 0, 1596, 0, '20080313 09:35:00', '73f6add4-7983-48fb-a93a-3ec5a6d17f1f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4814, N'delete', 0, N'DELETE FROM CMS_SiteDomainAlias WHERE [SiteDomainAliasID] = @ID', 0, 661, 0, '20081229 09:07:23', '978a70e8-ae6e-40fd-ae7a-0e033a65ac8a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4905, N'delete', 0, N'DELETE FROM Export_History WHERE [ExportID] = @ID', 0, 1616, 0, '20081229 09:07:06', 'a9a0faaa-920d-43dd-a134-e4fed375c7e1', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4906, N'insert', 0, N'INSERT INTO Export_History ([ExportDateTime], [ExportFileName], [ExportSiteID], [ExportUserID], [ExportSettings] ) VALUES ( @ExportDateTime, @ExportFileName, @ExportSiteID, @ExportUserID, @ExportSettings); SELECT SCOPE_IDENTITY() AS [ExportID]', 1, 1616, 0, '20081229 09:07:06', '4cd3899e-dcc6-402c-93af-f0bda585d5be', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4907, N'update', 0, N'UPDATE Export_History SET [ExportDateTime] = @ExportDateTime, [ExportFileName] = @ExportFileName, [ExportSiteID] = @ExportSiteID, [ExportUserID] = @ExportUserID, [ExportSettings] = @ExportSettings WHERE [ExportID] = @ExportID', 0, 1616, 0, '20081229 09:07:06', '121e9fa2-197a-4709-808d-4c110eb6c021', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4910, N'delete', 0, N'DELETE FROM Export_Task WHERE [TaskID] = @ID', 0, 1617, 0, '20081229 09:07:06', '0b60f885-d2da-4ae2-8109-db425b80642a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4911, N'insert', 0, N'INSERT INTO Export_Task ([TaskSiteID], [TaskTitle], [TaskData], [TaskTime], [TaskType], [TaskObjectType], [TaskObjectID] ) VALUES ( @TaskSiteID, @TaskTitle, @TaskData, @TaskTime, @TaskType, @TaskObjectType, @TaskObjectID); SELECT SCOPE_IDENTITY() AS [TaskID]', 1, 1617, 0, '20081229 09:07:06', '0c1446ea-5c9e-4d7b-aa2d-57a94d78ac56', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4912, N'update', 0, N'UPDATE Export_Task SET [TaskSiteID] = @TaskSiteID, [TaskTitle] = @TaskTitle, [TaskData] = @TaskData, [TaskTime] = @TaskTime, [TaskType] = @TaskType, [TaskObjectType] = @TaskObjectType, [TaskObjectID] = @TaskObjectID WHERE [TaskID] = @TaskID', 0, 1617, 0, '20081229 09:07:06', '46dbc017-cd42-4375-9a30-3dade989be93', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5023, N'delete', 0, N'DELETE FROM CMS_Query WHERE [QueryID] = @ID', 0, 161, 0, '20090102 14:02:46', 'ce6885a2-454e-47b5-8f97-d0b816d37e7e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5024, N'insert', 0, N'INSERT INTO CMS_Query ([QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom] ) VALUES ( @QueryName, @QueryTypeID, @QueryText, @QueryRequiresTransaction, @ClassID, @QueryIsLocked, @QueryLastModified, @QueryGUID, @QueryLoadGeneration, @QueryIsCustom); SELECT SCOPE_IDENTITY() AS [QueryID]', 1, 161, 0, '20090102 14:02:46', 'af216948-21dd-45ed-82fc-589b93afdf95', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5025, N'update', 0, N'UPDATE CMS_Query SET [QueryName] = @QueryName, [QueryTypeID] = @QueryTypeID, [QueryText] = @QueryText, [QueryRequiresTransaction] = @QueryRequiresTransaction, [ClassID] = @ClassID, [QueryIsLocked] = @QueryIsLocked, [QueryLastModified] = @QueryLastModified, [QueryGUID] = @QueryGUID, [QueryLoadGeneration] = @QueryLoadGeneration, [QueryIsCustom] = @QueryIsCustom WHERE [QueryID] = @QueryID', 0, 161, 0, '20090102 14:02:46', '83884ed9-dcf7-4318-a8f5-5d73f47b965e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5101, N'delete', 0, N'DELETE FROM CMS_ResourceSite WHERE [ResourceID] = @ResourceID AND [SiteID] = @SiteID', 0, 1632, 0, '20081229 09:07:22', 'df006488-c119-44ed-bc16-cf5e28d7a276', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5102, N'insert', 0, N'INSERT INTO CMS_ResourceSite ([ResourceID], [SiteID] ) VALUES ( @ResourceID, @SiteID);', 1, 1632, 0, '20081229 09:07:22', '98099a2a-da28-424e-9194-5f509a8d7c73', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5103, N'update', 0, N'SELECT NULL', 0, 1632, 0, '20081229 09:07:22', 'a27781b1-f9c7-40ca-85b4-df2a2a9ed87d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5065, N'delete', 0, N'DELETE FROM CMS_PageTemplateSite WHERE [PageTemplateID] = @PageTemplateID AND [SiteID] = @SiteID', 0, 1631, 0, '20081229 09:07:15', '1b576f8a-2654-4df9-a852-437e1f218952', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5066, N'insert', 0, N'INSERT INTO CMS_PageTemplateSite ([PageTemplateID], [SiteID] ) VALUES ( @PageTemplateID, @SiteID);', 1, 1631, 0, '20081229 09:07:15', '05189a1d-0feb-415d-802c-bf4986f823d1', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5067, N'update', 0, N'SELECT NULL', 0, 1631, 0, '20081229 09:07:15', '86e83e7b-516d-4424-bd02-99be2960922d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5145, N'delete', 0, N'DELETE FROM COM_DiscountLevelDepartment WHERE [DiscountLevelID] = @DiscountLevelID AND [DepartmentID] = @DepartmentID', 0, 1636, 0, '20081229 09:06:59', 'b75be9e9-e286-4a79-b590-d6291699684f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5146, N'insert', 0, N'INSERT INTO COM_DiscountLevelDepartment ([DiscountLevelID], [DepartmentID] ) VALUES ( @DiscountLevelID, @DepartmentID);', 1, 1636, 0, '20081229 09:06:59', 'e5e507f9-4846-4872-86d8-c8c322c48b0b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5147, N'update', 0, N'SELECT NULL', 0, 1636, 0, '20081229 09:06:59', '077a331e-014e-407f-830e-e4b57feb1d21', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5121, N'delete', 0, N'DELETE FROM CMS_WorkflowStepRoles WHERE [StepID] = @StepID AND [RoleID] = @RoleID', 0, 1635, 0, '20081229 09:07:41', 'b8e2fe5a-0f37-41d8-afb7-543ea0c8a1f6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5122, N'insert', 0, N'INSERT INTO CMS_WorkflowStepRoles ([StepID], [RoleID] ) VALUES ( @StepID, @RoleID);', 1, 1635, 0, '20081229 09:07:41', 'd8473658-4c27-459f-a7c2-e61dd82adbda', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5123, N'update', 0, N'SELECT NULL', 0, 1635, 0, '20081229 09:07:41', 'be5d74e9-3550-4041-b58a-9ac3d553d0e3', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5106, N'delete', 0, N'DELETE FROM CMS_SiteCulture WHERE [SiteID] = @SiteID AND [CultureID] = @CultureID', 0, 1633, 0, '20081229 09:06:58', '94f26e56-ec46-440c-ab54-62ef4987bddd', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5107, N'insert', 0, N'INSERT INTO CMS_SiteCulture ([SiteID], [CultureID] ) VALUES ( @SiteID, @CultureID);', 1, 1633, 0, '20081229 09:06:59', '864691a3-6dcd-4ec5-a830-8df7f48873b7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5108, N'update', 0, N'SELECT NULL', 0, 1633, 0, '20081229 09:06:59', '6b283334-9b09-4fb6-8725-5405d3bbe98b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5170, N'delete', 0, N'DELETE FROM COM_SKUDiscountCoupon WHERE [SKUID] = @SKUID AND [DiscountCouponID] = @DiscountCouponID', 0, 1640, 0, '20081229 09:07:23', '4347182f-c979-42b7-954a-1490faba392c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5171, N'insert', 0, N'INSERT INTO COM_SKUDiscountCoupon ([SKUID], [DiscountCouponID] ) VALUES ( @SKUID, @DiscountCouponID);', 1, 1640, 0, '20081229 09:07:23', '6cb38f79-b938-403d-805b-625bc7102e38', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5172, N'update', 0, N'SELECT NULL', 0, 1640, 0, '20081229 09:07:23', '2385fdf2-7c3b-4aa3-b25b-e347e16856fd', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5150, N'delete', 0, N'DELETE FROM CMS_ClassSite WHERE [ClassID] = @ClassID AND [SiteID] = @SiteID', 0, 1637, 0, '20081229 09:06:58', 'a63be15e-6bff-4421-b5f4-8eacd054b4ad', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5070, N'update', 0, N'SELECT NULL', 0, 536, 0, '20081229 09:07:21', '97a35e4f-6d26-4697-bd34-94dc1be2b8b5', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5175, N'delete', 0, N'DELETE FROM COM_SKUOptionCategory WHERE [SKUID] = @SKUID AND [CategoryID] = @CategoryID', 0, 1641, 0, '20081229 09:07:24', 'aa270f8a-d3c0-49d7-8e1c-9a42623edbda', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5176, N'insert', 0, N'INSERT INTO COM_SKUOptionCategory ([SKUID], [CategoryID] ) VALUES ( @SKUID, @CategoryID);', 1, 1641, 0, '20081229 09:07:24', '8788adb8-ce9a-4615-91d8-aabd723047f7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5177, N'update', 0, N'SELECT NULL', 0, 1641, 0, '20081229 09:07:24', '24bf76b6-f6f3-416f-8e30-90ca9eaa7a7e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5180, N'delete', 0, N'DELETE FROM COM_SKUTaxClasses WHERE [SKUID] = @SKUID AND [TaxClassID] = @TaxClassID', 0, 1642, 0, '20081229 09:07:24', 'fb60b453-6218-4aa8-b182-1ba2d045d7e0', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5181, N'insert', 0, N'INSERT INTO COM_SKUTaxClasses ([SKUID], [TaxClassID] ) VALUES ( @SKUID, @TaxClassID);', 1, 1642, 0, '20081229 09:07:24', '03024da4-049a-43d4-8adf-6176ad92fe8e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5182, N'update', 0, N'SELECT NULL', 0, 1642, 0, '20081229 09:07:24', '63fae284-2247-400d-847d-10fd5ad98bab', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5186, N'delete', 0, N'DELETE FROM COM_UserDepartment WHERE [UserID] = @UserID AND [DepartmentID] = @DepartmentID', 0, 1643, 0, '20081229 09:07:40', 'e57d3306-01df-425e-8b99-67304c86ee62', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5187, N'insert', 0, N'INSERT INTO COM_UserDepartment ([UserID], [DepartmentID] ) VALUES ( @UserID, @DepartmentID);', 1, 1643, 0, '20081229 09:07:40', '8d99042f-5338-441a-bc67-ecbbd12093c7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5188, N'update', 0, N'SELECT NULL', 0, 1643, 0, '20081229 09:07:40', '58ff6ef9-3501-4df0-aa7c-e9a371705593', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5191, N'delete', 0, N'DELETE FROM Forums_ForumRoles WHERE [ForumID] = @ForumID AND [RoleID] = @RoleID AND [PermissionID] = @PermissionID', 0, 1644, 0, '20081229 09:07:08', '79c70717-3607-4362-9761-81da13f98916', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5192, N'insert', 0, N'INSERT INTO Forums_ForumRoles ([ForumID], [RoleID], [PermissionID] ) VALUES ( @ForumID, @RoleID, @PermissionID);', 1, 1644, 0, '20081229 09:07:08', 'a80b63b6-9975-425a-8834-9fb969a1b7e2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5193, N'update', 0, N'SELECT NULL', 0, 1644, 0, '20081229 09:07:08', '7f279f9a-f783-4704-81c1-9ec96d4d4506', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5196, N'delete', 0, N'DELETE FROM Polls_PollRoles WHERE [PollID] = @PollID AND [RoleID] = @RoleID', 0, 1645, 0, '20081229 09:07:16', 'a5371a12-3348-48a8-865a-4b7959416ec2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5197, N'insert', 0, N'INSERT INTO Polls_PollRoles ([PollID], [RoleID] ) VALUES ( @PollID, @RoleID);', 1, 1645, 0, '20081229 09:07:16', '31e91392-e9f8-4823-ab07-939aa1ab3165', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5198, N'update', 0, N'SELECT NULL', 0, 1645, 0, '20081229 09:07:16', '87bfdd6c-e663-41f9-9e52-aa1d0753eec0', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5219, N'checkdependencies', 0, N'SELECT TOP 1 OrderID FROM COM_Order WHERE (OrderBillingAddressID = @ID) OR (OrderShippingAddressID = @ID) OR (OrderCompanyAddressID = @ID) UNION SELECT TOP 1 ShoppingCartID FROM COM_ShoppingCart WHERE (ShoppingCartBillingAddressID = @ID) OR (ShoppingCartShippingAddressID = @ID) OR (ShoppingCartCompanyAddressID = @ID)', 0, 1156, 0, '20080313 09:35:00', '0a0e4591-f9f7-4c54-8bd1-45b7e522456a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5233, N'update', 0, N'UPDATE CMS_LicenseKey SET [LicenseDomain] = @LicenseDomain, [LicenseKey] = @LicenseKey, [LicenseEdition] = @LicenseEdition, [LicenseExpiration] = @LicenseExpiration, [LicensePackages] = @LicensePackages, [LicenseServers] = @LicenseServers WHERE [LicenseKeyID] = @LicenseKeyID', 0, 930, 0, '20091211 15:01:08', '27aafc00-f22f-4fcf-9aa7-a206873e14e6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5229, N'delete', 0, N'DELETE FROM CMS_RolePermission WHERE [RoleID] = @RoleID AND [PermissionID] = @PermissionID', 0, 1648, 0, '20081229 09:07:22', '5f2e5b54-c001-4a94-b690-a94581329d8a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5230, N'insert', 0, N'INSERT INTO CMS_RolePermission ([RoleID], [PermissionID] ) VALUES ( @RoleID, @PermissionID);', 1, 1648, 0, '20081229 09:07:22', 'd02c13ab-1aaa-4839-9f70-5a0bd5a2abb9', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5231, N'update', 0, N'SELECT NULL', 0, 1648, 0, '20081229 09:07:22', '3e8ee4e6-34c3-485d-b715-bbf77752f972', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5242, N'delete', 0, N'DELETE FROM CMS_ResourceString WHERE [StringID] = @ID', 0, 1650, 0, '20090106 11:28:41', 'f1f5b4f3-0e51-460b-8c4a-30dccb016907', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5243, N'insert', 0, N'INSERT INTO CMS_ResourceString ([StringKey], [StringIsCustom], [StringLoadGeneration] ) VALUES ( @StringKey, @StringIsCustom, @StringLoadGeneration); SELECT SCOPE_IDENTITY() AS [StringID]', 1, 1650, 0, '20090106 11:28:41', 'fcdfc287-62de-4388-99e4-561fab26f163', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5244, N'update', 0, N'UPDATE CMS_ResourceString SET [StringKey] = @StringKey, [StringIsCustom] = @StringIsCustom, [StringLoadGeneration] = @StringLoadGeneration WHERE [StringID] = @StringID', 0, 1650, 0, '20090106 11:28:41', '487ce25a-5383-4861-9420-4bb0727c81ff', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5275, N'delete', 0, N'DELETE FROM Forums_ForumModerators WHERE [UserID] = @UserID AND [ForumID] = @ForumID', 0, 1659, 0, '20081229 09:07:08', '8f36827b-8afc-4a66-9e46-08a627730bca', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5276, N'insert', 0, N'INSERT INTO Forums_ForumModerators ([UserID], [ForumID] ) VALUES ( @UserID, @ForumID);', 1, 1659, 0, '20081229 09:07:08', '8fc617b9-88e3-411f-8f3f-b030c75626f6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5277, N'update', 0, N'SELECT NULL', 0, 1659, 0, '20081229 09:07:08', 'a95f66ab-196d-4a2f-9b7e-21a43a366f71', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5416, N'fetchemailstosend', 1, N'Proc_Newsletter_Emails_FetchEmailsToSend', 0, 919, 0, '20081103 17:05:29', '4d044efe-1c53-4e8d-a5d4-0377b3a1f6ad', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5270, N'delete', 0, N'DELETE FROM CMS_VersionAttachment WHERE [VersionHistoryID] = @VersionHistoryID AND [AttachmentHistoryID] = @AttachmentHistoryID', 0, 1658, 0, '20081229 09:07:40', '5dbd8cf5-070f-4fdd-9b29-31d8ef7f8a72', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5271, N'insert', 0, N'INSERT INTO CMS_VersionAttachment ([VersionHistoryID], [AttachmentHistoryID] ) VALUES ( @VersionHistoryID, @AttachmentHistoryID);', 1, 1658, 0, '20081229 09:07:40', '43df5bd8-3d70-47aa-aa13-c5a0cd7aa233', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5272, N'update', 0, N'SELECT NULL', 0, 1658, 0, '20081229 09:07:40', 'cfff630f-43b2-4776-bff1-153c8ba1e974', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5247, N'delete', 0, N'DELETE FROM CMS_ResourceTranslation WHERE [TranslationID] = @ID', 0, 1651, 0, '20081229 09:07:22', 'd3d39c85-4862-4193-b314-c30e1f96b93a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5248, N'insert', 0, N'INSERT INTO CMS_ResourceTranslation ([TranslationStringID], [TranslationUICultureID], [TranslationText] ) VALUES ( @TranslationStringID, @TranslationUICultureID, @TranslationText); SELECT SCOPE_IDENTITY() AS [TranslationID]', 1, 1651, 0, '20081229 09:07:22', 'ae476a2a-59db-4d0f-977f-6e39e812c11f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5249, N'update', 0, N'UPDATE CMS_ResourceTranslation SET [TranslationStringID] = @TranslationStringID, [TranslationUICultureID] = @TranslationUICultureID, [TranslationText] = @TranslationText WHERE [TranslationID] = @TranslationID', 0, 1651, 0, '20081229 09:07:22', '74316ef8-e144-41d5-8982-f5088b690fdb', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5429, N'vote', 0, N'UPDATE Polls_PollAnswer SET [AnswerCount]  = ([AnswerCount] + 1) WHERE [AnswerID] = @AnswerID', 0, 1331, 0, '20080425 12:00:00', '9079e1a6-be07-482e-819f-9c39432dffc0', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5464, N'delete', 0, N'DELETE FROM CMS_WebPartContainerSite WHERE [ContainerID] = @ContainerID AND [SiteID] = @SiteID', 0, 1682, 0, '20081229 09:07:41', '473bb127-f302-4084-a47f-b47f9e24945e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5465, N'insert', 0, N'INSERT INTO CMS_WebPartContainerSite ([ContainerID], [SiteID] ) VALUES ( @ContainerID, @SiteID);', 1, 1682, 0, '20081229 09:07:41', 'ae99c246-9a78-44cc-8d44-23da226e5cc9', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5466, N'update', 0, N'SELECT NULL', 0, 1682, 0, '20081229 09:07:41', 'a47e4ca5-e028-4b44-a1b2-e9806ac85471', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6034, N'delete', 0, N'DELETE FROM COM_DepartmentTaxClass WHERE [DepartmentID] = @DepartmentID AND [TaxClassID] = @TaxClassID', 0, 1720, 0, '20081229 09:07:00', '56f43ffe-2c5c-4c51-9ff8-b959e79d5fe9', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6035, N'insert', 0, N'INSERT INTO COM_DepartmentTaxClass ([DepartmentID], [TaxClassID] ) VALUES ( @DepartmentID, @TaxClassID);', 1, 1720, 0, '20081229 09:07:00', '359ca0e1-d445-45ab-9d84-50e9d7dae9d2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6036, N'update', 0, N'SELECT NULL', 0, 1720, 0, '20081229 09:07:00', '82c4862a-a62d-48e1-a3fb-b4e25794a32f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6029, N'delete', 0, N'DELETE FROM CMS_DocumentAlias WHERE [AliasID] = @ID', 0, 1719, 0, '20100322 15:37:58', 'a50f2867-d26d-44ed-8ca3-36449603f801', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6030, N'insert', 0, N'INSERT INTO CMS_DocumentAlias ([AliasNodeID], [AliasCulture], [AliasURLPath], [AliasExtensions], [AliasCampaign], [AliasWildcardRule], [AliasPriority], [AliasGUID], [AliasLastModified], [AliasSiteID] ) VALUES ( @AliasNodeID, @AliasCulture, @AliasURLPath, @AliasExtensions, @AliasCampaign, @AliasWildcardRule, @AliasPriority, @AliasGUID, @AliasLastModified, @AliasSiteID); SELECT SCOPE_IDENTITY() AS [AliasID]', 1, 1719, 0, '20100322 15:37:58', '08af53ac-1e82-4419-ad3c-260635912bc4', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6031, N'update', 0, N'UPDATE CMS_DocumentAlias SET [AliasNodeID] = @AliasNodeID, [AliasCulture] = @AliasCulture, [AliasURLPath] = @AliasURLPath, [AliasExtensions] = @AliasExtensions, [AliasCampaign] = @AliasCampaign, [AliasWildcardRule] = @AliasWildcardRule, [AliasPriority] = @AliasPriority, [AliasGUID] = @AliasGUID, [AliasLastModified] = @AliasLastModified, [AliasSiteID] = @AliasSiteID WHERE [AliasID] = @AliasID', 0, 1719, 0, '20100322 15:37:58', 'f566e64b-a1af-41f8-9866-b0aade625f1f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6075, N'delete', 0, N'DELETE FROM CMS_DocumentCategory WHERE [DocumentID] = @DocumentID AND [CategoryID] = @CategoryID', 0, 1726, 0, '20081229 09:06:59', '38150537-0391-4232-9608-e824ebeb27c5', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6076, N'insert', 0, N'INSERT INTO CMS_DocumentCategory ([DocumentID], [CategoryID] ) VALUES ( @DocumentID, @CategoryID);', 1, 1726, 0, '20081229 09:06:59', 'bee1c873-2edd-4799-898e-7888da3dc7ea', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6077, N'update', 0, N'SELECT NULL', 0, 1726, 0, '20081229 09:06:59', '1231d2ad-2735-4d63-bb9f-d26d52b004e0', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6083, N'deleteall', 0, N'DELETE FROM Analytics_HourHits WHERE ##WHERE##', 0, 1367, 0, '20080313 00:00:00', '6c1ea798-5e48-11dd-bea2-485a56d89593', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6086, N'deleteall', 0, N'DELETE FROM Analytics_DayHits WHERE ##WHERE##', 0, 1368, 0, '20080728 00:00:00', '1d61940a-2f42-11de-9d36-0f6556d89593', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6090, N'deleteall', 0, N'DELETE FROM Analytics_MonthHits WHERE ##WHERE##', 0, 1369, 0, '20080313 00:00:00', 'd76d0774-5e48-11dd-a358-795e56d89593', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6091, N'deletall', 0, N'DELETE FROM Analytics_WeekHits WHERE ##WHERE##', 0, 1370, 0, '20080313 00:00:00', '40d0284a-5e49-11dd-99b6-1c6356d89593', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6093, N'deleteall', 0, N'DELETE FROM Analytics_YearHits WHERE ##WHERE##', 0, 1371, 0, '20080313 00:00:00', '61d4f926-5e49-11dd-868e-656456d89593', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6094, N'deleteall', 1, N'Proc_Analytics_Statistics_Delete WHERE ##WHERE##', 1, 1366, 1, '20080313 00:00:00', '115b8ba8-5e4a-11dd-bd39-8a6c56d89593', 2, 1)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6191, N'delete', 0, N'DELETE FROM CMS_Tag WHERE [TagID] = @ID', 0, 1738, 0, '20081229 09:07:24', '98b97aa2-2877-4df4-8531-bfb1682cb637', 2, NULL)
SET IDENTITY_INSERT [CMS_Query] OFF
